<%@ page contentType="text/html; charset=utf-8" language="java" import="java.sql.*" errorPage="" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<div id="sidebar" class="sidebar responsive">
	<script type="text/javascript">
		try{ace.settings.check('sidebar' , 'fixed')}catch(e){}
	</script>
	<div class="sidebar-shortcuts" id="sidebar-shortcuts">
		<div class="sidebar-shortcuts-large" id="sidebar-shortcuts-large">
			<button class="btn btn-success">
				<i class="ace-icon fa fa-signal"></i>
			</button>

			<button class="btn btn-info">
				<i class="ace-icon fa fa-pencil"></i>
			</button>

			<button class="btn btn-warning">
				<i class="ace-icon fa fa-users"></i>
			</button>

			<button class="btn btn-danger">
				<i class="ace-icon fa fa-cogs"></i>
			</button>
		</div>

		<div class="sidebar-shortcuts-mini" id="sidebar-shortcuts-mini">
			<span class="btn btn-success"></span>
			<span class="btn btn-info"></span>
			<span class="btn btn-warning"></span>
			<span class="btn btn-danger"></span>
		</div>
	</div>
	<!-- 4个小图标  -->
	<ul class="nav nav-list">
		<li class="active" id="homeli">
	    	<a href="#" onclick="loadPage('homeli','${pageContext.request.contextPath}/manager/center.do')">
	            <i class="menu-icon fa fa-dashboard"></i>
	            <span class="menu-text"> 控制台 </span>
	        </a>
	    </li>
		<c:set value="${adminUser.menuList}" var ="menuList"></c:set>
		<c:forEach items="${menuList}" var="menu" varStatus="idxStatus">
			<c:if test="${menu.pid eq 0 && menu.level eq 0}" >
				<li class="" id="li${menu.id}">
					<a href="#" class="dropdown-toggle" >
						<i class="${menu.icon}"></i>
						<span class="menu-text"> ${menu.name} </span>
						<b class="arrow fa fa-angle-down"></b>
					</a>
					<b class="arrow"></b>
					<ul class="submenu">
						<c:forEach items="${menuList}" var="childMenu">
							<c:if test="${childMenu.pid eq menu.id && childMenu.level eq 0}">
								<li>
                                    <%--给每个节点设置连接属性--%>
                                    <%--数据库存储资源属性是不带项目路径的，所以需要拼接出一个带有根目录的路径出来  即加上${pageContext.request.contextPath}--%>
									<a href="#" onclick="loadPage('li${childMenu.pid}','${pageContext.request.contextPath}${childMenu.url}')">
										<i class="menu-icon fa fa-caret-right"></i>
										${childMenu.name}
									</a>
									<b class="arrow"></b>
								</li>		
							</c:if>
						</c:forEach>
					</ul>
				</li>
			</c:if>
		</c:forEach>
	</ul>
	
	<div class="sidebar-toggle sidebar-collapse" id="sidebar-collapse">
		<i class="ace-icon fa fa-angle-double-left" data-icon1="ace-icon fa fa-angle-double-left" data-icon2="ace-icon fa fa-angle-double-right"></i>
	</div>

	<!-- /section:basics/sidebar.layout.minimize -->
	<script type="text/javascript">
		try{ace.settings.check('sidebar' , 'collapsed')}catch(e){}
	</script>
</div>